﻿<!DOCTYPE HTML>
<html>
<head>
<#include "/script.ftl">
<title>订单列表</title>
<link rel="stylesheet" type="text/css" href="../static/eth/css/orderList.css" />
<script type="text/javascript" src="../lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="../static/eth/js/orderList.js"></script>  
</head>
<body id="body" class="search_body">
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>订单管理
		<span class="c-gray en">&gt;</span> 订单列表
	</nav>
	<div class="page-container">
		<form id="form" action="list" method="get" autocomplete="off">
			<input type="text" style="display:none" name="pageIndex" id="pageIndex" value="${page.curIndex!''}"/>
			<input type="text" style="display:none" name="pageSize" id="pageSize" value="${page.pageSize!''}" />
			<input type="text" style="display:none" name="rowsCount" id="rowsCount" value="${page.rowsCount!''}" />
			<input type="text" style="display:none" name="orderStatus" id="orderStatus" value="${intairOrder.orderStatus!''}" />
			<div class="text-c search_condition">
				<div class="search_line">
					<div class="search_item">
						<label>订单号</label>
						<input type="text" value="${intairOrder.orderNum!''}" placeholder="" id="" name="orderNum" class="input-text">
					</div>
					<div class="search_item">
						<label>外部订单号</label>
						<input type="text" value="${intairOrder.platformOrderNum!''}" placeholder="" id="" name="platformOrderNum" class="input-text">
					</div>
					<div class="search_item">
						<label>乘机人</label>
						<input type="text" value="${intairOrder.passengerNames!''}" placeholder="" id="" name="passengerNames" class="input-text">
					</div>
					<div class="search_item3">
				    	<label>预定日期</label>
			        	<input type="text" name="bookDateStartStr" value="${intairOrder.bookDateStartStr!''}" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'bookDateEndStr\')}'})" class="input-text Wdate" autocomplete="off" id="bookDateStartStr" placeholder="yyyy-MM-dd">		                
			        	<input type="text" name="bookDateEndStr" value="${intairOrder.bookDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'bookDateStartStr\')}'})" class="input-text Wdate" autocomplete="off" id="bookDateEndStr" placeholder="yyyy-MM-dd">
				    </div>				
				</div>
				<div class="search_line">
					<div class="search_item">
						<label>PNR</label>
						<input type="text" value="${intairOrder.pnr!''}" placeholder="" id="" name="pnr" class="input-text">
					</div>
					<div class="search_item">
						<label>航班号</label>
						<input type="text" value="${intairOrder.flightNo!''}" placeholder="" id="" name="flightNo" class="input-text">
					</div>
					<div class="search_item">
						<label>状态查询</label>
						<select name="orderStatusTemp" class="input-text orderStatusTemp" id="orderStatusTemp">
							<option value=""></option>
							<#assign statusMap={"ORDER_STATUS_CHECKING":"待审核","ORDER_STATUS_PAYING":"待付款","ORDER_STATUS_TICKETING":"待出票","ORDER_STATUS_TICKETED":"已出票","ORDER_STATUS_REFUSED":"已拒回","ORDER_STATUS_INVALIDING":"待废票","ORDER_STATUS_CHANGING":"待改期","ORDER_STATUS_REFUNDING":"待退款"} />
							<#list statusMap?keys as key>
								<#if key! = intairOrder.orderStatus!''>
									<option value="${key}" selected="selected">${statusMap['${key}']}</option>
								<#else>
									<option value="${key}">${statusMap['${key}']}</option>
								</#if>
							</#list>
						</select>
					</div>
					<div class="search_item">
				    	<a id="findButton" href="javascript:;" class="btn btn-primary radius" style="width:150px">查询</a> 				   		
				   	</div>
				</div>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
			    <span class="l">
			        <a  href="javascript:submitStatus('')" class="btn btn-primary radius">全部订单</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_CHECKING')" class="btn btn-primary radius">待审核</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_PAYING')" class="btn btn-primary radius">待付款</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_TICKETING')" class="btn btn-primary radius">待出票</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_TICKETED')" class="btn btn-primary radius">已出票</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_REFUSED')" class="btn btn-primary radius">已拒回</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_INVALIDING')" class="btn btn-primary radius">待废票</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_CHANGING')" class="btn btn-primary radius">待改期</a>
					<a  href="javascript:submitStatus('ORDER_STATUS_REFUNDING')" class="btn btn-primary radius">待退款</a>
			    </span>
			</div>
			<div class="cl bg-1 bk-gray search_result_head">
			    <table class="table">
			    	<thead class="head text-c">
					    <th width="20%" class="search_result_td"><label>行程信息</label></th>
					    <th width="10%" class="search_result_td"><label>航班号</label></th>
					    <th width="10%" class="search_result_td"><label>起飞时间</label></th>
					    <th width="15%" class="search_result_td"><label>乘机人</label></th>
					    <th width="10%" class="search_result_td"><label>总额</label></th>
					    <th width="15%" class="search_result_td"><label>订单状态</label></th>
					    <th width="15%" class="search_result_td">
					        <select name="platform" class="input-text" onChange="$('#form').submit();" id="platform">
								<option value=""><label>全部来源</label></option>			
								<option value="PLATFORM_ZIYING" <#if intairOrder.platform! ="PLATFORM_ZIYING">selected="selected"</#if>><label>本地订单</label></option>		
								<option value="PLATFORM_CTRIP" <#if intairOrder.platform! ="PLATFORM_CTRIP">selected="selected"</#if>><label>携程</label></option>
								<option value="PLATFORM_QUNAER" <#if intairOrder.platform! ="PLATFORM_QUNAER">selected="selected"</#if>><label>去哪儿</label></option>
								<option value="PLATFORM_TONGCHENG" <#if intairOrder.platform! ="PLATFORM_TONGCHENG">selected="selected"</#if>><label>同城</label></option>
								<option value="PLATFORM_TAOBAO" <#if intairOrder.platform! ="PLATFORM_TAOBAO">selected="selected"</#if>><label>淘宝</label></option>
							</select>
						</th>
				 	</thead>
				</table>
			</div>
			<#list page.items! as order>
			<div class="search_result_box ">
			    <table class="table">
			        <tr class="head text-c">
						<td width="20%" class="search_result_td "><span class="c-999">订单号：</span><a class="c-primary" onClick="order_edit('订单详情','detail?orderId=${order.orderId!}')" href="javascript:;">${order.orderNum!""}</a></td>
						<td width="20%" colspan="2" class="search_result_td c-999">预定日期：${order.bookDateStr!""}</td>
						<td width="15%" class="search_result_td c-999">PNR:${order.pnr!""}</td>	
						<td colspan="2" width="25%"></td>
						<td colspan="3" width="40%">
						<#if order.orderStatus! ="ORDER_STATUS_TICKETING">
							<a onclick="" href="javascript:;" class="btn btn-primary size-S radius">自动出票</a> 
						</#if>
						</td>
					</tr>
					<tr class="content text-c" ondblclick="order_edit('订单详情','detail?orderId=${order.orderId!}')">			
						<td width="20%">
							<label>${(order.departureCityName!'')+"("+(order.departureCity!'')+")---"+(order.arrivalCityName!'')+"("+(order.arrivalCity!'')+")"}</label>						
						</td>
						<td width="10%">		
							<label>${order.flightNo!""}<label><br>				
						</td>	
						<td width="10%">					
							<span>${order.departureDateStr!""}</span>		
						</td>	
						<td width="15%"><label>${order.passengerNames!""}</label></td>	
						<td width="10%"><label class="c-red">¥${order.totalAmount!""}</label></td>	
						<td width="15%">
							<label>${order.orderStatusName!""}</label><br>
							<label><a class="c-primary" onClick="order_edit('订单详情','detail?orderId=${order.orderId!}')" href="javascript:;">查看详情</a></label>
						</td>	
						<td width="15%">
							<label>${order.platformName!""}</label><br>
							<#if order.orderStatus! ="ORDER_STATUS_CHECKING">
								<label><a class="a_policy c-primary" id="native_a_${order.orderId}" onClick="searchNativePolicy('${order.orderId}')" href="javascript:;">展开本地政策</a></label><br>
								<label><a class="a_policy c-primary" id="others_a_${order.orderId}" onClick="searchOthersPolicy('${order.orderId}','${order.pnr}')" href="javascript:;">展开其他政策</a><label>							
							</#if>
						</td>					
					</tr>
					<#if order.orderStatus! ="ORDER_STATUS_CHECKING">
						<tr style="background-color:#ffffff;">
							<td colspan="8" style="padding-left:0;padding-right:0;">
								<div class="log" id="casa_native${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">正在加载...</p></div>
							    <table  class="table_native_policy table table-border" style="display:none" id="native_tbl_${order.orderId!}" >
							    </table>
					    	</td>
						</tr>
						<tr style="background-color:#ffffff;">
							<td colspan="8" style="padding-left:0;padding-right:0;">
								<div class="log" id="casa_JinTong${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">今通正在加载...</p></div>
								<div class="log" id="casa_517NA${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">517NA正在加载...</p></div>
								<div class="log" id="casa_YI8000${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">8000YI正在加载...</p></div>
								<div class="log" id="casa_MEIYA${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">美亚正在加载...</p></div>
								<div class="log" id="casa_TRAVELZEN${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">真旅正在加载...</p></div>
								<div class="log" id="casa_TWFLIGHT${order.orderId!}" style="display: none;"><img src="../static/eth/images/loading_page.gif"><p class="mt10">东立正在加载...</p></div>
								<table class="table_other_policy table table-border" style="display:none" id="other_tbl_${order.orderId!}" >  
							    	<thead>
							    		<tr class='policy_head'>
											<th width='6%'>政策来源</th>
											<th width='8%'>结算价含税</th>
											<th width='8%'>运价/税收</th>
											<th width='8%'>代理费/奖励</th>
											<th width='8%'>直减/开票费</th>
											<th width='8%'>出票类型</th>
											<th width='8%'>是否换编</th>
											<th width='8%'>出票时间</th>
											<th width='6%'>适用条件</th>
											<th width='6%'>选择</th>
											<th width='6%'>下单</th>
										</tr>
									</thead>
							    	<tbody class="JinTong policy_content"><tbody>
							    	<tbody class="517NA policy_content"><tbody>
							    	<tbody class="YI8000 policy_content"><tbody>
							    	<tbody class="TraFree policy_content"><tbody>
							    	<tbody class="MEIYA policy_content"><tbody>
							    	<tbody class="TRAVELZEN policy_content"><tbody>
							    	<tbody class="TWFLIGHT policy_content"><tbody>
							    </table>
					    	</td>
						</tr>
			    	</#if>       
			    </table>
			</div>		
			</#list>
			<div id="div">
				<div id="Pagination" class="pagination mt-20"></div>
			</div>		
		</form>
	</div>
</body>
</html>